<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html; charset=utf-8" import="com.*"%>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	    <title>制卡批次信息查询</title>
	    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	    <script src="${pageContext.request.contextPath }/scripts/boot.js" type="text/javascript"></script>
	   <style type="text/css">
	   </style> 
  </head>
  <body>
   <form id="form1" method="post">
 	 <!-- ============================== 第一部分 查询条件================================================== -->
 	  	<div style="width: 100%">
 	   		<table style="width: 100%" >
 	   			<tr style="width: 100%">
 	   				<td style="width: 8%;text-align: right;">制卡批次:</td>
 	   				<td style="width: 12%"><input id="aaz001" name="aaz001" class="mini-textbox" onenter="search" vtype="minLength:10" maxLength="10" style="width:100%;" emptyText="请输入制卡批次" maxLength="10" /></td>
 	   				<td style="width: 10%;text-align: right;white-space:nowrap;">批次录入人:</td>
 	   				<td style="width: 10%"><input id="aae300" name="aae300" class="mini-textbox"  style="width:100%;" maxLength="10" onenter="search" emptyText="请输入录入人姓名"/></td>
 	   				<td style="width: 10%;text-align: right;white-space:nowrap;">批次录入时间:</td>
 	   				<td style="width: 12%"><input id="aaz402_start" name="aaz402_start" class="mini-datepicker"  onenter="search" maxLength="8" style="width:100%;" emptyText="请输入起始时间"/></td>
 	   				<td style="width: 10%;text-align: right;white-space:nowrap;">批次终止时间:</td>
 	   				<td style="width: 12%"><input id="aaz402_end" name="aaz402_end" class="mini-datepicker"  onenter="search" style="width:100%;" maxLength="8" emptyText="请输入终止时间"/></td>
 	   				<td style="width: 8%;"><a class="mini-button" iconCls="icon-search"  onclick="search()"  >查询</a></td>
 	   				<td style="width: 8%;"><a class="mini-button" iconCls="icon-remove"  onclick="onReset()"  >重置</a></td>
 	   			</tr>
 	   		</table>
 	   	 </div>	     
 	   	</form>
 	 <!-- ============================== 第二部分  查询结果================================================== -->
 	 	<div id="datagrid1" class="mini-datagrid" style="width:100%;height:400px;" 
 	   	  		url="${pageContext.request.contextPath}/AZ10.do?method=getAZ10" idField="id" allowResize="true"
 	   	  		idField="id" multiSelect="true"
 	   	  		>
	 	   	<div property="columns">
	 	   		  <div type="indexcolumn" ></div>
	 	   		  <div field="aaz001"  width="100" headerAlign="center"align="center">制卡批次</div>
		          <div field="aaz707"  width="80" headerAlign="center" align="center" >生效时间</div> 
		          <div field="aaz708"  width="80" headerAlign="center" align="center">领取时间</div>
		          <div field="aaz719"  width="60" headerAlign="center" align="center">是否特殊批次</div>
		          <div field="aae300"  width="80" headerAlign="center" align="center">批次录入人</div>
		          <div field="aaz402"  width="80" headerAlign="center" align="center" >批次录入时间</div>
		          <div field="aaz705"  width="80" headerAlign="center" align="center">批次终止人</div>
		          <div field="aaz706"  width="80" headerAlign="center" align="center">批次终止时间</div>
			</div> 
 	   	  </div>
	
    <script type="text/javascript">
		mini.parse();
	    var grid = mini.get("datagrid1");
	    var form = new mini.Form("form1");
        /* grid.load(); */
	    function search() {
            var key = mini.get("aaz402_start").getFormValue();           
            var key1 = mini.get("aaz402_end").getFormValue();
            var key2 = mini.get("aaz001").getValue();
            var key3 = mini.get("aae300").getValue();
            var flag = key2.substring(0,2);
            if(key=="" && key1 == "" && key2 == "" && key3 == ""){
            	mini.alert("请输入查询条件！");
            	return;
        	}
            if(flag != 'GR' && flag != 'DW'&& key2 !=''){
        		mini.alert("请输入以GR或者DW开头的十位批次号！");
        		return ;
            }
          	grid.load({ key: key,key1:key1,key2:key2,key3:key3});
            
        }
               
        function onReset(){
        	form.clear();
        	grid.clearRows();
        }
    </script>
  </body>
</html>